package newcoder;

import java.util.*;

public class NC131 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        list.add(3);
        list.add(2);
        list.add(6);
        list.sort(((o1, o2) -> o1-o2));
        System.out.println(list);

        HashMap<String,Integer> map = new HashMap<>();
        String a = new String("qbc");
        map.put(a,1);
        map.put(a,map.getOrDefault(a,0)+1);
        map.put("a",map.getOrDefault("a",0)+1);
        LinkedHashMap<String,Integer> b = new LinkedHashMap<>();
        String pre = "q";
        System.out.println("q".matches(pre+".*"));
        System.out.println(map.containsKey("qbc"));
        System.out.println(""+2);

    }
}
